#pragma once
#include "AbstractObject.h"
#include "PathNode.h"
#include <queue>
#include <stack>
#include <Ogre.h>

class MovableObject : public AbstractObject
{
public:
	MovableObject(void);
	~MovableObject(void);

	virtual void update(const Ogre::FrameEvent& evt) = 0;
	void setNode(PathNode* pNode);

protected:
	void setTarget(PathNode* pNode);
	bool moveToTarget(const Ogre::FrameEvent& evt);
	void setRotationAxis(Ogre::Vector3 axis);
	void setSpeed(float speed);

	PathNode* mpCurrentNode;
	PathNode* mpTargetNode;
private:
	Ogre::Real mDistance;
	Ogre::Vector3 mDirection;

	Ogre::Vector3 mRotationAxis;
	float mSpeed;
};